program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var k,t,c,n,i,z:integer;
begin
readln(n,k);
 c:=1;
 t:=1;
  if (k>(n-k)) then
    begin
      for i:=k+1 to n do
         t:=t*i;
      for i:=1 to n-k do
        begin
         c:=c*i;
        end ;
         z:=t div c;
    end
  else
    begin
      for i:=(n-k+1) to n do
         t:=t*i;
      for i:=1 to k do
        begin
         c:=c*i;
        end;
         z:=t div c;
    end;

   writeln(z);
   readln;
   
end.
